function Thing(data)
{
        this.marker = null;
        this.uid = data['uid'];
        this.id = data['id'];
        this.title = data['title'];
        this.description = data['description'];
        this.price = data['price'];
        this.lat = data['lat'];
        this.lng = data['lng'];
        this.latlng = new L.LatLng(this.lat,this.lng);
        this.distance = 0;
        this.username = data['username'];
        this.added = data['added'];
        this.modified = data['modified'];
        this.imgURL = data['imgURL'];
        //var latlng = ; //format Leaflet
        
        this.setMarker = function(leafletMarker)
        {
                this.marker = leafletMarker;
        };
        
        /*
         * coordinates: array[lat,lng]
         */
        this.setDistance = function(coordinates)
        {
                this.distance = this.latlng.distanceTo(coordinates);
        };
}